package com.woniuxy.thread;

import java.util.List;
import java.util.Vector;
import java.util.concurrent.TimeUnit;

public class Job1 {

	public static void main(String[] args) {
		List<Integer> data = new Vector<Integer>();

		for (int i = 0; i < 10000; i++) {
			new Thread(new Runnable() {
				@Override
				public void run() {
					data.add(1);
				}
			}).start();
		}

		try {
			TimeUnit.SECONDS.sleep(3);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

		System.out.println(data.size());
	}

}
